<?php
/**
 * 继承自ErrorObject的Adapter适配器
 * Created by PhpStorm.
 * User: liangtiehui
 * Date: 2015/12/22
 * Time: 23:04
 */
namespace Adapter;

class LogToCsvAdapter extends ErrorObject
{
    private $_errorNum, $_errorText;

    public function __construct($error)
    {
        parent::__construct($error);

        $parts = explode(":", $this->getError());

        $this->_errorNum = $parts[0];
        $this->_errorText = $parts[1];
    }

    public function getErrorNum()
    {
        return $this->_errorNum;
    }

    public function getErrorText()
    {
        return $this->_errorText;
    }
}